package com.xq.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xq.dao.UserDao;
import com.xq.domain.Menu;
import com.xq.domain.Order;
import com.xq.domain.Yuser;
import com.xq.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class UserServiceImpl implements UserService {



    @Autowired
    UserDao userDao;


    @Override
    public Yuser log(Yuser yuser) {
        return userDao.log(yuser);
    }

    @Override
    public ArrayList<Order> list(Order order) {
        return userDao.list(order);
    }

    @Override
    public PageInfo<Order> fen(Order order, int a, int s) {

        PageHelper.startPage(a,s);

        return new PageInfo<Order>(this.list(order));
    }

    @Override
    public int add(Order order) {
        return userDao.add(order);
    }

    @Override
    public ArrayList<Menu> ss() {
        return userDao.ss();
    }


}
